package felix.rule.api;

import felix.rule.data.msg.EngineMsg;

import java.util.function.Consumer;

public interface RuleChainTransactionService {

    void beginTransaction(EngineMsg msg, Long duration, Consumer<EngineMsg> onStart, Consumer<EngineMsg> onEnd, Consumer<Throwable> onFailure);

    void endTransaction(EngineMsg msg, Consumer<EngineMsg> onSuccess, Consumer<Throwable> onFailure);

}
